//
//  lockView.m
//  基本框架
//
//  Created by runone02 on 2018/8/21.
//  Copyright © 2018年 liqiyun. All rights reserved.
//

#import "lockView.h"

@interface lockView()


@end

@implementation lockView


- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
    self.numberButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.numberButton setTitle:@"设置数字锁屏样式" forState:UIControlStateNormal];
    [self.numberButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.numberButton.layer setMasksToBounds:YES];
    [self.numberButton.layer setCornerRadius:1.0];
    
    [self.numberButton.layer setBorderWidth:1.0];
    self.numberButton.layer.borderColor = [UIColor orangeColor].CGColor;

    self.numberButton.backgroundColor = [UIColor orangeColor];
    [self addSubview:self.numberButton];
    [self.numberButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self);
        make.top.mas_equalTo(kTopBarHeight+50);
        make.left.mas_equalTo(20);
        make.right.mas_equalTo(-20);
        make.height.mas_equalTo(50);
    }];
    
    self.pathButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.pathButton setTitle:@"设置路径锁屏样式" forState:UIControlStateNormal];
    [self.pathButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.pathButton.layer setMasksToBounds:YES];
    [self.pathButton.layer setCornerRadius:1.0];
    
    [self.pathButton.layer setBorderWidth:1.0];
    self.pathButton.layer.borderColor = [UIColor orangeColor].CGColor;

    self.pathButton.backgroundColor = [UIColor orangeColor];
    [self addSubview:self.pathButton];
    [self.pathButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self);
        make.top.mas_equalTo(self.numberButton.mas_bottom).with.offset(20);
        make.left.mas_equalTo(20);
        make.right.mas_equalTo(-20);
        make.height.mas_equalTo(50);
    }];
    
    
    self.reviseButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.reviseButton setTitle:@"修改密码" forState:UIControlStateNormal];
    [self.reviseButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.reviseButton.layer setMasksToBounds:YES];
    [self.reviseButton.layer setCornerRadius:1.0];
    
    [self.reviseButton.layer setBorderWidth:1.0];
    self.reviseButton.layer.borderColor = [UIColor orangeColor].CGColor;

    self.reviseButton.backgroundColor = [UIColor orangeColor];
    [self addSubview:self.reviseButton];
    [self.reviseButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self);
        make.top.mas_equalTo(self.pathButton.mas_bottom).with.offset(20);
        make.left.mas_equalTo(20);
        make.right.mas_equalTo(-20);
        make.height.mas_equalTo(50);
    }];
    
    self.deleteButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.deleteButton setTitle:@"删除密码" forState:UIControlStateNormal];
    [self.deleteButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.deleteButton.layer setMasksToBounds:YES];
    [self.deleteButton.layer setCornerRadius:1.0];
    
    [self.deleteButton.layer setBorderWidth:1.0];
    self.deleteButton.layer.borderColor = [UIColor orangeColor].CGColor;

    self.deleteButton.backgroundColor = [UIColor orangeColor];
    [self addSubview:self.deleteButton];
    [self.deleteButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self);
        make.top.mas_equalTo(self.reviseButton.mas_bottom).with.offset(20);
        make.left.mas_equalTo(20);
        make.right.mas_equalTo(-20);
        make.height.mas_equalTo(50);
    }];
}


@end
